#!/bin/bash

echo "添加文件到暂存区..."
git add .

echo "提交更改..."
if [ $1 ]; then
    input=$1
else    
    read -r -p "请输入本地提交说明>" input
fi
if [ -z "$input" ];then
    echo "提交失败，请输入本地提交说明"
    exit 1
fi    
git commit -am "${input}"

echo "推送更改..."
git push origin master

echo "推送成功"